package com.blb.zycommunity.controller;

import com.blb.zycommunity.entity.SysUser;
import com.blb.zycommunity.entity.ZyBuilding;
import com.blb.zycommunity.entity.ZyCommunity;
import com.blb.zycommunity.mapper.SysUserMapper;
import com.blb.zycommunity.mapper.ZyBuildingMapper;
import com.blb.zycommunity.mapper.ZyCommunityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.web.bind.annotation.*;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author chenheng
 * @since 2023-11-20
 */
@RestController
public class TestController {

    @Resource
    private ZyCommunityMapper zyCommunityMapper;

    @Resource
    private ZyBuildingMapper zyBuildingMapper;

    @Resource
    private SysUserMapper sysUserMapper;

    @Autowired
    private BCryptPasswordEncoder bCryptPasswordEncoder;
    @RequestMapping("/zycommunity/test")
    public void test(){
//        ZyCommunity zyCommunity = zyCommunityMapper.selectById(1338423795842494467L);
//        zyCommunityMapper.updateById(zyCommunity);
//        ZyBuilding zyBuilding = zyBuildingMapper.selectById(1338441072113565698L);
//        SysUser sysUser = sysUserMapper.selectById(1L);
        String encode = bCryptPasswordEncoder.encode("123456");
        System.out.println(encode);
    }
}
